
package com.hazelcast.jet.impl;

import java.util.Objects;

public class SqlSummary {
    private final String query;
    private final boolean unbounded;

    public SqlSummary(String query, boolean unbounded) {
        this.query = query;
        this.unbounded = unbounded;
    }

    public String getQuery() {
        return query;
    }

    public boolean isUnbounded() {
        return unbounded;
    }

    @Override
    public String toString() {
        return "SqlSummary{" + "query='" + query + '\'' + ", unbounded=" + unbounded + '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SqlSummary that = (SqlSummary) o;
        return unbounded == that.unbounded && Objects.equals(query, that.query);
    }

    @Override
    public int hashCode() {
        return Objects.hash(query, unbounded);
    }
}
